function [f] = hyperparameters_objective(b0,Y,X)

n     = size(Y,1);

k     = size(X,2);

gamma_hyper = trace(X'*X/n)/k;

aux   = (.5*Y'*( (eye(n) + X*X'/(gamma_hyper*k) )^(-1))*Y );

b_n   = b0 + aux;

a0b0  = (.5*n)*b0*(1/aux);

f     = a0b0*log(b0) ...
        + gammaln(a0b0+(n/2)) ...
        -(a0b0 + (n/2))*log(b_n) ...
        -gammaln(a0b0);

end

